package com.nbcio.modules.crm.opportunity.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * CRM销售机会实体
 */
@Data
@TableName("crm_opportunity")
public class CrmOpportunity {
    @TableId
    private Long opportunityId;
    private String opportunityCode;
    private String opportunityName;
    private Long customerId;
    private Long contactId;
    private Long ownerUserId;
    private Long ownerDeptId;
    private String stage; // INITIAL/REQUIREMENT/QUOTE/NEGOTIATE/WIN/LOSE
    private Integer probability; // 成交概率(%)
    private BigDecimal expectedAmount;
    private LocalDate expectedDate;
    private BigDecimal actualAmount;
    private LocalDate actualDate;
    private String source;
    private String competitorInfo;
    private String description;
    private String status; // ACTIVE/WON/LOST/CANCELLED
    private String winReason;
    private String loseReason;
    private Long createBy;
    private LocalDateTime createTime;
    private Long updateBy;
    private LocalDateTime updateTime;
    private Long createDept;
    private String tenantId;
}


